The present invention relates to erasing device and method of a storage unit such as a flash memory etc., and to a storage medium storing a program for erasing the storage unit, which automatically erases stored content in the storage unit.